/*
 * @Author: wuqingchun
 * @Date: 2024-09-24 09:47:31
 * @Description: mysql 数据库User表字段定义
 * @LastEditors: wuqingchun
 * @LastEditTime: 2024-10-03 14:03:26
 */
#ifndef __CHAT_USER_H__
#define __CHAT_USER_H__

#include <string>

class CChatUser
{
public:
    CChatUser(int iID, const std::string& refName, const std::string& refPassword, const std::string& refState):
        m_iID(iID),
        m_strName(refName),
        m_strPassword(refPassword),
        m_strState(refState)
    {

    }

    CChatUser()
    {
        m_iID = -1;
        m_strName = "";
        m_strPassword = "";
        m_strState = "offline";
    }

    ~CChatUser()
    {

    }

    int GetID() const
    {
        return m_iID;
    }

    std::string GetName() const
    {
        return m_strName;
    }

    std::string GetPassword() const
    {
        return m_strPassword;
    }

    std::string GetState() const
    {
        return m_strState;
    }

    void SetID(int iID)
    {
        m_iID = iID;
    }

    void SetName(const std::string& refName)
    {
        m_strName = refName;
    }

    void SetPassword(const std::string& refPassword)
    {
        m_strPassword = refPassword;
    }

    void SetState(const std::string& refState)
    {
        m_strState = refState;
    }
    
private:
    int         m_iID;           // 用户ID
    std::string m_strName;       // 用户名称
    std::string m_strPassword;   // 用户密码
    std::string m_strState;      // 用户状态
};

#endif //__CHAT_USER_H__